app.controller('QianKeInfoCtrl', ['$scope','$state', '$stateParams',QianKeInfoCtrl]);

function QianKeInfoCtrl($scope,$state, $stateParams){

	$scope.getHotelData = function(id){
		if(id==1){
			var data = [
				{
					'hotelName':'杭州市江干区富悦假日酒店',
					'roomNum':'305',
					'checkInTime':'2017-05-21-23-49-00',
					'checkOutTime':'2017-05-21-23-49-00',
					'hotelAddr':'浙江省杭州市江干区同协路378号',
					'hotelCode':'3301045600737'
				},
				{
					'hotelName':'杭州市江干区圣杭旅馆',
					'roomNum':'209',
					'checkInTime':'2017-05-18-11-41-00',
					'checkOutTime':'2017-05-19-10-45-40',
					'hotelAddr':'浙江省杭州市江干区九堡家苑三区11排59号',
					'hotelCode':'3301046200764'
				}
			]
			
		}else{
			var data = [
				{
					'hotelName':'杭州市江干区吉泰快捷酒店',
					'roomNum':'305',
					'checkInTime':'2017-05-21-23-49-00',
					'checkOutTime':'2017-05-21-23-49-00',
					'hotelAddr':'浙江省杭州市江干区同协路378号',
					'hotelCode':'3301045600737'
				}
			]

		}
		return data;
	}

	$scope.getNetbarData = function(id){
		var data = [
			{
				'barName':'千山(网翼网咖)',
				'loginTime':'2017-05-21-23-49-00',
				'logoutTime':'2017-05-22-10-54-13',
				'barAddr':'浙江省杭州市江干区仁爱路2号',
				'barCode':'33010410000108'
			}
		]
		return data;
	}

	$scope.getTempLiveData = function(id){
		var data = [
			{
				'code':330102201500023277,
				'address':'浙江省杭州市江干区仁爱路2号',
				'regiTime':'2017-05-21',
				'expireTime':'2018-05-21',
				'ownerName':'张大明',
				'station':'江干分局丁桥派出所'
			}
		]
		return data;
	}

	$scope.getPreCriminal = function(id){
		var data = [
			{
				'type':'一类重点人员',
				'mark':'标记一',
				'detailType':'打砸抢暴乱',
				'time':'2018-05-21',
				'livingPlace':'浙江省杭州市江干区仁爱路2号',
				'station':'江干分局丁桥派出所'
			}
		]
		return data;
	}

	$scope.getImpPer = function(id){
		var data = [
			{
				'type':'一类重点人员',
				'time':'2017-02-21-23-49-00',
				'detailType':'打砸抢暴乱',
				'livingPlace':'浙江省杭州市江干区仁爱路2号',
				'fingerprint':'无变化',
				'dnaCode':'33012014036626',
				'chaOfMeans':'喜欢凌晨犯罪'
			}
		]
		return data;
	}

	$scope.getPerInfo = function(id){
		var data = 
			{
				id:1,
				name:'黄月月',
				XB:'男',
				MZ:'汉',
				score:20,
				birthday:'1963年6月23日',
				IDNum:'340825199110170837',
				address:'浙江省杭州市江干区九堡家苑3区12排36-39号',
				intro:'多次在网吧通宵，有多次前科犯罪历史，无工作。',
				level:1,
				photo:'../img/test.png',
				JG:'新疆和田',
				JGWX:1
			}
		return data;
	}
		$scope.personGroup= {
	1:'高危人员',
	2:'潜在犯罪',
	3:'三级人员'
}

	$scope.id = $stateParams.id;
	$scope.hotelData = $scope.getHotelData($scope.id);
	$scope.barData = $scope.getNetbarData($scope.id);
	$scope.tempLiveData = $scope.getTempLiveData($scope.id)
	$scope.preCriminal = $scope.getPreCriminal($scope.id)
	$scope.impPers = $scope.getImpPer($scope.id)
	$scope.perInfo = $scope.getPerInfo($scope.id);

	$scope.goBack=function(){
		history.back()
	}

	$scope.option = ['hotel','netbar','tempLiving','preCriminal','impPer']

	$scope.haveInfo=function(val){
		if($scope.option.indexOf(val)>-1){
			return true;
		}else{
			return false;
		}
	}

	$scope.checkInfo=function(val){
		var index = $scope.option.indexOf(val);
		if(index>-1){
			$scope.option.splice(index,1)
		}else{
			$scope.option.push(val)
		}
	}

}
